package site.sorghum.ddl.mybatis.flex.entity;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.Table;
import lombok.Value;
import site.sorghum.ddl.annotation.DdlIndex;

import java.math.BigDecimal;

@Value
@Table("flex_bank_account")
public class BankAccount {
    @Id
    @Column("long_id")
    String longId;
    @DdlIndex(group = 0)
    @Column("number_2")
    String accountNumber;
    String accountHolder;
    @Column(ignore = true)
    BigDecimal balance;
    @DdlIndex(group = 1)
    AccountType accountType;

    public enum AccountType {
        SAVINGS, CHECKING, CREDIT
    }
}